import React from 'react';

export default class SelectTab extends React.Component {
    constructor(props) {
        super(props);
    }
    
    render() {
        return (
            <span className={this.props.spanClass}>
                {
                    this.props.dataSource.length>0?this.props.dataSource.map(function(data,idx){
                        return(
                            <a href="javaScript:void(0);" className={data.classstyle} onClick={()=>this.props.onClick(data.id,idx)}>{data.name}</a>
                        )
                    },this):""
                }
            </span>
        )
    }
};